/*
 * control.h
 *
 *  Created on: Feb 19, 2014
 *      Author: bohni
 */

#ifndef CONTROL_H_
#define CONTROL_H_

#include <avr/eeprom.h>

#include "filter.h"
#include "Scheduler.h"
#include "UART.h"
#include "Mathe.h"
#include "config.h"

///////////////////////////////////////////////////////////////////
extern int8_t motor_values[];

void control(int8_t throttle, int8_t x, int8_t y, int8_t z);

void control_init();

void control_angle_xy(int8_t throttle, float w_angle_x, float w_angle_y);
void control_angle_z(float w_angle_z);

void control_acceleration_xy(int8_t throttle, float w_acc_x, float w_acc_y);

void control_rate_z(float w_rate_z);
void control_v_xy(int8_t throttle, float v_x, float w_v_y);

void control_pid_update();
//////////////////////////////////////////////////////////////////////
#endif /* CONTROL_H_ */
